# -*- js -*-
{
    "version": "2.1",

    "jobs": {
        "build": {
            "docker": [{"image": "debian:stable"}],
            "steps": [
                "checkout",
                {"run": "apt-get update -qq"},
                {"run": "apt-get install -qq cloc make build-essential git luajit lua5.1 lua5.2 lua5.3 lua5.4"},
                {"run": "make ci"},
                {"run": "git diff --quiet"},
            ]
        },
        "windows": {
            "executor": "windows/default",
            "steps": [
                "checkout",
                {"run": "choco install -y lua53"},
                {"run": "choco install -y make"},
                {"run": "make test LUA=lua53"}
            ]
        }
    },

    "workflows": {
        "version": 2,
        "all": {
            "jobs": ["build", "windows"]
        }
    },

    "orbs": {
        "windows": "circleci/windows@2.2.0"
    }
}
